Skip to content

feat(code): GitHub inbox connect banner and API integration#1897

Merged
Twixes merged 3 commits intomainfrom
feat/code-github-connect-banner
Apr 30, 2026
Merged

feat(code): GitHub inbox connect banner and API integration#1897
Twixes merged 3 commits intomainfrom
feat/code-github-connect-banner

Conversation

@Twixes
Copy link
Copy Markdown
Member

@Twixes Twixes commented Apr 27, 2026

Summary

Adding support for the new UserIntegration in PostHog Code's Inbox.

Making GitHubConnectionBanner always starts the PostHog Cloud UserIntegration flow via startGithubUserIntegrationConnect(projectId). This is much better than doing the social auth thing.

Also, fixed InboxSourcesDialog width, and when the project itself has no access configured, we auto-open the dialog to nudge the user.

PostHog app / web changes (unified account-connected GitHub routes and redirects, UserIntegration github/start endpoint): Graphite – PostHog/posthog#55304

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 27, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/components/list/GitHubConnectionBanner.tsx
Line: 89-91

Comment:
**Redundant `disabledReason` during loading conflicts with tooltip**

When `connecting=true`, both `loading={connecting}` and `disabledReason="GitHub connection is starting"` are passed together with a non-null `tooltipContent`. `buildTooltipContent` will then render a two-section tooltip: the full info content *plus* "Disabled because GitHub connection is starting." Since the button is loading and the spinner already communicates the state, the combined tooltip is redundant and potentially confusing if the user hovers over the disabled wrapper span. Passing `disabledReason={null}` (or omitting it) while `loading=true` would give cleaner feedback — the spinner is sufficient.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat(code): GitHub inbox banner connect ..." | Re-trigger Greptile

Comment thread apps/code/src/renderer/features/inbox/components/list/GitHubConnectionBanner.tsx Outdated
@Twixes Twixes force-pushed the feat/code-github-connect-banner branch 2 times, most recently from 717b53c to c5bbb35 Compare April 28, 2026 13:37
Copy link
Copy Markdown
Member Author

Twixes commented Apr 28, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Twixes Twixes requested review from a team and tatoalo April 28, 2026 13:38
Use project-scoped GitHub integration for banner copy, call github/start
from the API with connect_from=posthog_code, and fall back to Personal
integrations in the browser. Add startGithubUserIntegrationConnect on
PostHogAPIClient; support loading + spinner on shared Button with an
in-flight guard on the banner. Point main GitHub authorize next step at
/account-connected/github-login for PostHog web companion behavior.
@Twixes Twixes force-pushed the feat/code-github-connect-banner branch from d8950a3 to 1c0f5c0 Compare April 28, 2026 17:20

// ── Signal source configs ───────────────────────────────────────────────
const { data: signalSourceConfigs } = useSignalSourceConfigs();
const { data: signalSourceConfigs, isPending: signalSourceConfigsPending } =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const { data: signalSourceConfigs, isPending: signalSourceConfigsPending } =
const { isPending: signalSourceConfigsPending, data: signalSourceConfigs } =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'M SORRY LOL

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think formatter will complain here if we do this, but maybe not 🤔

Connect your GitHub profile to highlight what's relevant to you
</span>
{connecting ? (
<Spinner size="1" className="shrink-0 text-current" />
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] i think this spinner shows up the entire time the flow happens in-browser, right? if so maybe we can put some help text more prominently, like what's in the tooltip currently, so it's obvious the user needs to go to the browser and isn't actually waiting on any processes in-app

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure @cursoragent do it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, had to do it manually like in the old days

@Twixes Twixes merged commit 042d1c2 into main Apr 30, 2026
16 of 17 checks passed
@Twixes Twixes deleted the feat/code-github-connect-banner branch April 30, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants